Skip to main content

UnitTests

Unit Test Plan – Horizontal Bar Chart with axiss

Test stepsValidationTool used
Test 1: Render content for only bars
- With all propertiesShould return proper bar dataRTL
- Without xAxisCalloutDataShould return proper bar data without xAxisCalloutDataRTL
- Without yAxisCalloutDataShould return proper bar data without yAxisCalloutDataRTL
- Without xAxisCalloutData and yAxisCalloutDataShould return proper bar data without xAxisCalloutData and yAxisCalloutDataRTL
- Without legend, xAxisCalloutData and yAxisCalloutDataShould return proper bar data without legend, xAxisCalloutData and yAxisCalloutDataRTL
Test 2: Get scales
- With numeric axisShould return scales for numeric axisRTL
- With string axisShould return scales for non-numeric axisRTL
- With numeric axis - RTLShould return scales for numeric axis - RTL
Test 3: Create numeric bars
- With numeric axisShould return proper bar data with numeric axis dataRTL
- Width as 0Should return proper bar width when container width is 0RTL
Test 4: get callout content for bar
- Non Empty DataShould return proper callout data for respective barRTL
Test 5: Create colors
- useSingleColor as trueshould return the color scale - using single colorRTL
- userSingleColor as falseshould return the color scale - using multiple colorRTL
Test 6: Get Legend data
- Empty dataShould return empty legends data when there is no chart dataRTL
- With numeric axis dataShould return proper legends data with numaric yAxis dataRTL
- With string axis dataShould return proper legends data with string yAxis dataRTL
Test 7: Get Aria-Label
- With all properties

Should return proper aria label

RTL
- Without xAxisCalloutData

Should return proper aria label without xAxisCalloutData

RTL
- Without yAxisCalloutData

Should return proper aria label without yAxisCalloutData

RTL
- Without xAxisCalloutData and yAxisCalloutData

Should return proper aria label without xAxisCalloutData and yAxisCalloutData

RTL
- With callOutAccessibilityData

Should return bar aria-label properly when we have callOutAccessibilityData

RTL
- With callOutAccessibilityData and other properties

Should return bar aria-label properly when we have callOutAccessibilityData and other properties

RTL